<template>
  <div>
    <div>
      <el-dialog title="子项信息" width="800px" @open="open" center class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
       <el-table :data="childList" height="calc(100vh - 370px)">
         <el-table-column :label="$t('field.Bomlist_FMATERIALINO')" property="fmaterialno"></el-table-column>
         <el-table-column :label="$t('field.Bomlist_FMATERIALNAME')" property="fmaterialname"></el-table-column>
         <el-table-column :label="$t('field.Bomlist_FSPECIFICATION')" property="fspecification"></el-table-column>
         <el-table-column :label="$t('field.Bomlist_FUNITID')" property="funitid"></el-table-column>
         <el-table-column :label="$t('field.Bomlist_FNUMERATOR')" property="fnumerator"></el-table-column>
         <el-table-column :label="$t('field.Bomlist_FDENOMINATOR')" property="fdenominator"></el-table-column>
         <el-table-column :label="$t('field.Bomlist_FFIXSCRAPQTY')" property="ffixscrapqty"></el-table-column>
         <el-table-column :label="$t('field.Bomlist_FSCRAPRATE')" property="fscraprate"></el-table-column>
<!--         <el-table-column :label="$t('field.Bomlist_FOWNERID')" property="fownerid"></el-table-column>-->
       </el-table>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import {detail, getChildList} from '@/api/app/bom'
export default {
  name: "bomList",
  props: {
    show: {
      type: Boolean,
      default: true
    },
    size: {
      type: String,
      default: 'mini'
    },
    info: {
      type: Object,
    },
  },
  data() {
    return {
      childList:[],
    }
  },
  watch:{
    show(val){
      if(val){
      }
    }
  },
  methods: {
    open(){
      getChildList(this.info).then(res => {
        this.childList = res.data
        console.log(res)
      })
    },
    closeForm(){
      this.$emit('update:show', false)
    }
  }

}

</script>

<style scoped>

</style>